#include"BitTree.h"

void MakeBitree(Elemtype x,BiTree l,BiTree r)
{
	BiTree root = (BiTree)malloc(sizeof(BiNode));
	if (NULL == root)
	{
		perror("malloc");
		return 1;
	}
	root->data = x;
	root->Lchild = l;
	root->Rchild = r;
}

BiTree CreateNewNode(Elemtype x)
{
	BiTree newnode = (BiTree)malloc(sizeof(BiNode));
	if (newnode == NULL)
	{
		perror("malloc");
		return 1;
	}
	newnode->data = x;
	newnode->Lchild = NULL;
	newnode->Rchild = NULL;
	return newnode;
}